package com.shortvedio.search.api;

import com.shortvedio.base.context.BaseContext;
import com.shortvedio.base.model.Result;
import com.shortvedio.search.service.FavoritesServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FavoritesController {
    @Autowired
    private FavoritesServcie favoritesServcie;

    @GetMapping("get_favorites_list")//获取收藏夹列表
    public Result getFavoritesList(){
        Long userId = BaseContext.getCurrentId();
        Result favoritesList = favoritesServcie.getFavoritesList(userId);
        return favoritesList;
    }

}
